var main = {
    name:'admin',
    password:'123456',

}
var {name , password}=main;
console.log('用户名：'+name,'密码：'+password);


var main = {
    name:'admin',
    password:'123456',
    address:{
        sheng:'江西省',
        shi:'南昌市',
        qu:'青山湖区'
    }
}

var {name , password,address:{sheng,shi,qu}}=main;
console.log('用户名：'+name,'密码：'+password,'省：'+sheng,'市：'+shi,'区：'+qu);

var x=1, y=2;
[x, y] = [y, x]
console.log(x,y);


var {hostname:domain, pathname:path} = location;
console.log(location);